// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) 

package com.nnee.p_pr.p_activity;

import android.app.Activity;
import android.content.Intent;
import android.graphics.Color;
import android.os.Bundle;
import android.view.GestureDetector;
import android.view.KeyEvent;
import android.view.Window;
import android.widget.Button;
import android.widget.FrameLayout;
import android.widget.LinearLayout;
import android.widget.ViewFlipper;
import com.nnee.p_b.p_a.cls_d;
import com.nnee.p_img.cls_c;
import com.nnee.p_pr.p_b.cls_a;

// Referenced classes of package com.nnee.p_pr.p_activity:
//            MainGridActivity, de, dh, dg

public class cls_PRISActivityGuide extends Activity
{

    public cls_PRISActivityGuide()
    {
        d = false;
    }

    static ViewFlipper a(cls_PRISActivityGuide prisactivityguide)
    {
        return prisactivityguide.e;
    }

    private void b()
    {
        int i = 0;
        if(!com.nnee.p_pr.p_b.cls_a.n()) {
        	 if(d)
             {
                 if(!com.nnee.p_b.p_a.cls_d.h().i())
                     i = 7;
                 com.nnee.p_pr.p_activity.cls_MainGridActivity.a(this, i, 1);
             }
        } else {
        com.nnee.p_pr.p_activity.cls_MainGridActivity.a(this, i, i);
        }
 
        finish();
     
    }

    static void b(cls_PRISActivityGuide prisactivityguide)
    {
        prisactivityguide.b();
    }

    static GestureDetector c(cls_PRISActivityGuide prisactivityguide)
    {
        return prisactivityguide.g;
    }

    void a()
    {
        boolean flag = false;
        d = getIntent().getBooleanExtra("update", flag);
        if(d)
        {
            int ai1[] = new int[2];
            ai1[0] = 0x7f020081;
            ai1[1] = 0x7f020082;
            c = ai1;
        } else
        {
            int ai[] = new int[5];
            ai[0] = 0x7f02007c;
            ai[1] = 0x7f02007d;
            ai[2] = 0x7f02007e;
            ai[3] = 0x7f02007f;
            ai[4] = 0x7f020080;
            c = ai;
        }
        g = new GestureDetector(new cls_de(this));
        f = new FrameLayout(this);
        f.setBackgroundColor(Color.rgb(234, 234, 235));
        f.setLayoutParams(new android.widget.FrameLayout.LayoutParams(-1, -1));
        e = new ViewFlipper(this);
        e.setLayoutParams(new android.view.ViewGroup.LayoutParams(-1, -1));
        for(int i=0; i < c.length; i++)
        {
            LinearLayout linearlayout = new LinearLayout(this);
            linearlayout.setBackgroundResource(c[i]);
            linearlayout.setId(i);
            e.addView(linearlayout, new android.view.ViewGroup.LayoutParams(-1, -1));
        }

        f.addView(e, new android.view.ViewGroup.LayoutParams(-1, -1));
        Button button = new Button(this);
        button.setText(0x7f0a0155);
        button.setOnClickListener(new cls_dh(this));
        android.widget.FrameLayout.LayoutParams layoutparams = new android.widget.FrameLayout.LayoutParams(com.nnee.p_img.cls_c.a(this, 84F), com.nnee.p_img.cls_c.a(this, 42F));
        layoutparams.gravity = 81;
        layoutparams.bottomMargin = com.nnee.p_img.cls_c.a(this, 12F);
        f.addView(button, layoutparams);
        f.setOnTouchListener(new cls_dg(this));
        setContentView(f);
        if(d)
            com.nnee.p_pr.p_d.cls_c.b(getString(0x7f0a0016));
        else
            com.nnee.p_pr.p_d.cls_c.b(getString(0x7f0a0017));
    }

    protected void onCreate(Bundle bundle)
    {
        getWindow().setFlags(1024, 1024);
        requestWindowFeature(1);
        super.onCreate(bundle);
        a();
    }

    protected void onDestroy()
    {
        if(e != null)
        {
            e.removeAllViews();
            e.clearAnimation();
            e = null;
        }
        super.onDestroy();
    }

    public boolean onKeyDown(int i, KeyEvent keyevent)
    {
        if(keyevent.getAction() == 0 && i == 4)
            b();
        return super.onKeyDown(i, keyevent);
    }

    static final String a = "PRISActivityGuide";
    public static final String b = "update";
    int c[];
    private boolean d;
    private ViewFlipper e;
    private FrameLayout f;
    private GestureDetector g;
}
